<template>
  <div class="app-container">
    <el-form label-width="120px">
      <h5>基本信息</h5>
      <el-row>
        <el-col :span="12">
          <el-form-item label="单据编号" prop="documentNumber">
            <el-input v-model="this.qualityPredictPojo.documentNumber" :disabled="true" maxlength="30" style="width:240px"/>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="填写人员" prop="fillInName">
            <el-input v-model="this.qualityPredictPojo.fillInName" :disabled="true" maxlength="30" style="width:240px"/>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="所在岗位" prop="fillInUserPost">
            <el-input v-model="this.qualityPredictPojo.fillInUserPost" :disabled="true" maxlength="30" style="width:240px"/>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="所在部门" prop="fillInUserDept">
            <el-input v-model="this.qualityPredictPojo.fillInUserDept" :disabled="true" maxlength="30" style="width:240px"/>
          </el-form-item>
        </el-col>
      </el-row>
<!--      <el-row>-->
<!--        <el-col :span="12">-->
<!--          <el-form-item label="备注" prop="remark">-->
<!--            <el-input v-model="this.qualityPredictPojo.remark" :disabled="true" maxlength="30"/>-->
<!--          </el-form-item>-->
<!--        </el-col>-->
<!--      </el-row>-->
    </el-form>
    <el-form label-width="120px">
      <h5>预测信息</h5>
      <el-row>
        <el-col :span="12">
          <el-form-item label="用工日期" prop="predictTime">
            <el-input v-model="this.qualityPredictPojo.predictTime" :disabled="true" maxlength="30" style="width:240px"/>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="预测班次" prop="predictTimeShift">
            <el-input v-model="this.qualityPredictPojo.predictTimeShift" :disabled="true" maxlength="30" style="width:240px"/>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="预测24h" prop="future24PredictNumber">
            <el-input v-model="this.qualityPredictPojo.future24PredictNumber" :disabled="true" maxlength="30" style="width:240px">
            <i slot="append" style="margin-right: 10px">万件</i>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="预测12h" prop="future12PredictNumber">
            <el-input v-model="this.qualityPredictPojo.future12PredictNumber" :disabled="true" maxlength="30" style="width:240px">
            <i slot="append" style="margin-right: 10px">万件</i>
            </el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="省内未发" prop="provinceNotIssued">
            <el-input v-model="this.qualityPredictPojo.provinceNotIssued" :disabled="true" maxlength="30" style="width:240px">
            <i slot="append" style="margin-right: 10px">万件</i>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="车辆数" prop="carNumber">
            <el-input v-model="this.qualityPredictPojo.carNumber" :disabled="true" maxlength="30" style="width:240px">
              <i slot="append" style="margin-right: 10px">辆</i>
            </el-input>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="12">
          <el-form-item label="待卸量" prop="unloadedNumber">
            <el-input v-model="this.qualityPredictPojo.unloadedNumber" :disabled="true" maxlength="30" style="width:240px">
              <i slot="append" style="margin-right: 10px">万件</i>
            </el-input>
          </el-form-item>
        </el-col>

      </el-row>

<!--      <el-card class="box-card" style="margin-top: 20px">-->
<!--        <div slot="header" class="clearfix">-->
<!--          <span>附件</span>-->
<!--        </div>-->
<!--        <div style="max-width: 500px">-->
<!--          <el-upload-->
<!--            :limit="2"-->
<!--            class="upload-annex"-->
<!--            :headers="upload.headers"-->
<!--            :action="upload.url"-->
<!--            :file-list="fileList">-->
<!--            <el-button size="small" type="primary">上传文件</el-button>-->
<!--            <div slot="tip" class="el-upload__tip">最多上传两个附件</div>-->
<!--            <div slot="tip" class="el-upload__tip">支持扩展名：.rar .zip .doc .docx .pdf .jpg</div>-->
<!--          </el-upload>-->
<!--        </div>-->

<!--      </el-card>-->
    </el-form>
  </div>
</template>

<script>
  import { viewQualityPredict } from "@/api/job/qualityPredict/qualityPredict";
  export default {
    name: "attendanceGroup",
    created() {
      this.viewQualityPredict();
    },
    data() {
      return {
        // 是否显示弹出层（数据权限）
        openDataScope: false,
        menuExpand: false,
        menuNodeAll: false,
        deptExpand: true,
        deptNodeAll: false,
        qualityPredictId: this.$route.query.qualityPredictId,
        qualityPredictPojo:undefined,
        //附件文件列表
        fileList: [],
        defaultProps: {
          children: "children",
          label: "label",
        },
      };
    },

    methods: {
      viewQualityPredict() {
        viewQualityPredict(this.qualityPredictId).then(es => {
          this.qualityPredictPojo = es.data;
          const urls = [];
          this.fileList.forEach(item=>{
            if(item.status ==="success"){
              urls.push(item.response.fileName)
            }
          })
        })
      },
    },
  };
</script>
